#!usr/bin/env python  
#@time: 2018/01/23 
import psutil
#CPU逻辑数量
# logic_cpu_num = psutil.cpu_count()
# print(logic_cpu_num)

#CPU物理核心数
# physical_cpu_num = psutil.cpu_count(logical=False)
# print(physical_cpu_num)

#统计CPU的用户/系统/空闲时间
# cpu_status = psutil.cpu_times()
# print(cpu_status)

# for x in range(10):
#    cpu_status = psutil.cpu_percent(interval=1, percpu=True)
#    print(cpu_status)

#获取内存信息
# virtual_memory = psutil.virtual_memory()
# swap_memory = psutil.swap_memory()
# print(virtual_memory)
# print(swap_memory)

#获取磁盘信息
# partion_info = psutil.disk_partitions()
# print(partion_info)
#
# disk_usage = psutil.disk_usage('F:\\')
# print(disk_usage)

#获取网络信息
# net_info = psutil.net_io_counters()
# print(net_info)
#
# net_eth_info = psutil.net_if_addrs()
# print(net_eth_info)

#获取进程信息
# process_info = psutil.pids()
# print(process_info)

ps = psutil.test()
print(ps)